package com.ad.nbi.util;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.Properties;

public class PropertiesUtils {
	private static Properties properties;
	private static void initConfig(){
		properties=new Properties();
		try {
			properties.load(new FileReader( new File("config.properties")));
		} catch (FileNotFoundException e) {
			
			e.printStackTrace();
		} catch (IOException e) {
			
			e.printStackTrace();
		}
	}
	public static String getConfigPropertis(String key){
		if(properties==null){
			initConfig();
		}
		return properties.getProperty(key, "");
	}
	
}
